| 概要 | |
|---|---|
|
ファイル: \examples\Processing\Geometry\ImageMoments\ImageMoments.va |
![]() |
|
デフォルトプラットフォーム: mE5-MA-VCL |
|
|
簡単な説明 入力画像の画像モーメントの方向と離心率を計算します。 |
|
画像処理におけるモーメントは、画像の各ピクセルの輝度の平均値です。これらのモーメントを使用することで、画像内のオブジェクトの方向、離心率、面積、重心などの物理的特性を特定できます。
方向
オブジェクトの定義は以下となります。
[Bur06]:
二次中心モーメントを使用:
定義を使用:
重心は以下です。
および生モーメントは
オブジェクトの面積に対応します。
ここで、g(x,y) はデジタルグレースケール画像のグレースケール関数です。
VisualApplets では、オリジナル画像と、オブジェクトの面積、重心、方向、離心率などの幾何学的プロパティを出力とするデザインが実装されています。このサンプルは \examples\Processing\Geometry\ImageMoments\ImageMoments.va にあります。 計算には 4 の Parallelism が選択されています。 図 324「基本的なデザイン構造」に、コメント付きのデザイン構造を示します。
グレースケール画像の幾何学的プロパティ(面積、重心、方向、離心率)は、モーメントを介して計算されます(HierarchicalBox: ImageMoments)。
これらのプロパティは、元のカメラ画像に追加されます(AppendMomentsToImage)。
次の項目:フレックス 図325:ImageMomentsのコンテンツ HierarchicalBox ImageMoments を示しています。生モーメント
(オブジェクトの面積に対応)
および
、および重心
と中心モーメントは
および
上記の式に従って実装されています。最後に、画像オブジェクトの主軸の幾何学的Propertyである配向
および離心率eがこれらの結果から計算されます。
では、 図326:HierarchicalBox orientation_thetaのコンテンツ および 図327:HierarchicalBox eccentricityのコンテンツ HierarchicalBoxのコンテンツである orientation_theta および eccentricity
が、個々の処理ステップに関するコメントとともに示されています。配向 orientation
と離心率 e は、次の値を使用して計算されます。
に従って、 式24 および
式29。
ARCTANオペレーターへの入力信号には、R=7の解像度が選択されています。
Comment: During implementation of the orientation of Θ it showed, that limitation to 12 bits maximum input signal of the ARCTAN function can be a problem for calculation of accuracy and resolution: for example the image of an ellipse with orientation Θ= 44.07° (result of moment implementation with MATLAB) was analyzed. The 25 bit input signal for the ARCTAN function has to be limited to 12 bits. With resolution of R= 8 bits the implementation in VisualApplets has result 41.43°; with R=7 bits the result is 43.21° (with resolution for small angles of 0.2°) and with R= 6 it is 44.07° (with resolution for small angles of 0.45°). As an result we found that with high resolution (R= 8 bit) the maximum angle of calculation is smaller than the true angle of orientation, due to bit depth limitation. With smaller resolution R the result of calculation improves for big angles but has as an consequence smaller accuracy in the range of small angles. The problem can be solved by using a Lookup table instead of ARC TAN operator.









前へ

